package com.gxa.worker.recycling.service.impl;

import com.gxa.core.recycling.pojo.Advice;
import com.gxa.core.recycling.pojo.BenMessage;
import com.gxa.worker.recycling.mapper.NoticeMapper;
import com.gxa.worker.recycling.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Condition;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author 廖泓宇
 * @date 2021/12/2 11:27
 */
@Service
public class NoticeServiceImpl implements NoticeService {

    @Autowired
    NoticeMapper noticeMapper = null;

    @Override
    public List<BenMessage> selectAllByNotice() {
        Example example = new Example(BenMessage.class);
        Example.OrderBy releaseTime = example.orderBy("releaseTime").asc();
        List<BenMessage> benMessages = noticeMapper.selectByExample(example);
        return benMessages;
    }
}